
<!DOCTYPE html>
<html>
<head>
	<title>Foundation Library PNaCl Test Suite</title>
</head>
<body>
	<h1>Foundation Library PNaCl Test Suite</h1>
	<p>
		<div id="test" style="width: 0px; height: 0px;">
			<embed id="plugin"
				width="0" height="0"
				src="test-all.nmf"
				type="application/x-pnacl" />
		</div>
		<pre id="log"></pre>
		<script type="text/javascript">
			var log = document.getElementById( 'log' );
			var haspnacl = navigator.mimeTypes['application/x-pnacl'] !== undefined;
			if( haspnacl ) {
				var plugin = document.getElementById( 'plugin' );
				plugin.addEventListener( "message", function( rawmsg ) {
					var parsed = JSON.parse( rawmsg.data );
					log.textContent += parsed.msg + '\n';
				}, false );
			}
			else {
				log.textContent = "Your browser does not have PNaCl support";
			}
		</script>
	</p>
</body>
</html>
